<%@ page language="java" import="java.util.*" pageEncoding="utf-8" isErrorPage="true"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>煤矿安全质量标准化管理系统</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #016aa9;
	overflow: hidden;
}

.STYLE1 {
	color: #000000;
	font-size: 12px;
}
-->
</style>
<script language="javascript"> 
	if(top!=self){
		if(top.location != self.location)
		top.location=self.location; 
	}
	function loginFocus(){
		document.getElementById("userName").focus();
	}
</script>

	</head>

	<body onload="loginFocus();">
	<s:form id="form1" namespace="/" action="loginAction!login.action" method="post">
		<table width="100%" height="100%" border="0" cellpadding="0"
			cellspacing="0">
			<tr>
				<td>
					<table width="962" border="0" align="center" cellpadding="0"
						cellspacing="0">
						<tr>
							<td height="235" background="images/login_03.gif">
								<div align="center" style="margin-top: 220px"><font color="#930000" style="font-weight: bold;font-size: 12px">${error_msg }</font></div>
							</td>
						</tr>
						<tr>
							<td height="53">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="394" height="53" background="images/login_05.gif">
											
										</td>
										<td width="206" background="images/login_06.gif">
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td width="18%" height="25">
														<div align="right">
															<span class="STYLE1">用户：</span>
														</div>
													</td>
													<td width="57%" height="25">
														<div align="center">
															<s:textfield name="userName" id="userName" cssStyle="width: 105px; height: 17px; background-color: #292929; border: solid 1px #7dbad7; font-size: 12px; color: #6cd0ff"></s:textfield>
														</div>
													</td>
													<td width="27%" height="25">
														&nbsp;
													</td>
												</tr>
												<tr>
													<td height="25">
														<div align="right">
															<span class="STYLE1">密码：</span>
														</div>
													</td>
													<td height="25">
														<div align="center">
															<s:password name="password" cssStyle="width: 105px; height: 17px; background-color: #292929; border: solid 1px #7dbad7; font-size: 12px; color: #6cd0ff"></s:password>
														</div>
													</td>
												</tr>
											</table>
										</td>
										<td width="362" background="images/login_07.gif">
											
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td height="213" background="images/login_08.gif" style="vertical-align: top;padding-top: 15px">
								<div align="center" >
									<a href="javascript:login();"><img src="images/dl.gif" width="50" height="18" border="0"></a>
									<!-- 
									<span style="padding-left: 30px">
										<a href="main.jsp"><img src="images/zc.gif" width="49" height="18" border="0"></a>
									</span>
									 -->
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</s:form>
	</body>
</html>
<script type="text/javascript"> 
	if(document.addEventListener){//如果是Firefox 
		document.addEventListener("keypress",fireFoxHandler, true); 
	}else{ 
		document.attachEvent("onkeypress",ieHandler); 
	} 
	
	function fireFoxHandler(evt){ 
		//alert("firefox"); 
		if(evt.keyCode==13){ 
		   login();
		} 
	} 
	
	function ieHandler(evt){ 
		//alert("IE"); 
		if(evt.keyCode==13){ 
		   login();
		} 
	} 
	function login(){
		var form1 = document.getElementById("form1");
		form1.action = "loginAction!login.action";
		form1.submit();
	}
</script>
